import { createApp } from 'vue'
import App from '@/App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//引入Element-plus国际化
//@ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// import en from 'element-plus/dist/locale/en.mjs'
//svg插件配置代码
import 'virtual:svg-icons-register'
//通过自定义插件的方式安装全局组件
import GlobleComponent from '@/components'
//引入模板的全局样式文件
import '@/styles/index.scss'
//引入模板路由
import Router from './router'
//引入仓库 store
import pinia from './store'
//获取应用的实例对象
const app = createApp(App)
//安装element-plus 插件
app.use(ElementPlus, {
  locale: zhCn, //设置Element-plus国际化配置
})
//调用app.use方法安装全局组件
app.use(GlobleComponent)
//注册模板路由
app.use(Router)
//安装仓库
app.use(pinia)
//将应用挂在到挂在点上
app.mount('#app')
